import { request } from '@boeyo/portal';

//设备类型列表
export const getAlarmStrategyList = (params) => {
  return request({
    url: 'alarmRule/list',
    method: 'GET',
    params,
  });
};
export const addAlarmStrategy = async (data) => {
  return request({
    url: '/alarmRule/add',
    method: 'POST',
    data,
  });
};
export const updateAlarmStrategy = async (data) => {
  return request({
    url: '/alarmRule/update',
    method: 'PUT',
    data,
  });
};

/**
 * 删除告警策略 删除告警策略
 * @ss.hasPermi('alarmRule:delete')
 */
export const deletAlarmStrategy = (ids) => {
  return request({
    url: `alarmRule/delete/${ids}`,
    method: 'DELETE',
  });
};

/**
 * 通知组下拉选择 通知组下拉选择
 * @ss.hasPermi('roleGroup:selectList')
 */
export const getRoleGroupSelectList = (params?: any) => {
  return request({
    url: 'roleGroup/selectList',
    method: 'GET',
    params,
  });
};
